resource "huaweicloud_rds_instance" "mod_rds" {
  name                = var.rds_name
  flavor              = var.rds_flavor
  ha_replication_mode = var.ha_replication_mode
  vpc_id              = var.vpc_id
  subnet_id           = var.subnet_id
  security_group_id   = var.vsg_id
  availability_zone   = var.availability_zone

  db {
    type     = var.db_type
    version  = var.db_version
    password = var.db_pwd
  }
  volume {
    type = "CLOUDSSD"
    size = var.disk_size
  }
  backup_strategy {
    start_time = "02:00-03:00"
    keep_days  = 30
  }
}